package com.erp.service.impl;

import com.erp.entity.Breakage;
import com.erp.entity.vo.BreakageSituationVO;
import com.erp.entity.vo.BreakageVO;
import com.erp.mapper.BreakageMapper;
import com.erp.service.BreakageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author pyj
 * @since 2020-11-07
 */
@Service
public class BreakageServiceImpl implements BreakageService {

    @Autowired
    private BreakageMapper breakageMapper;
    
    @Override
    public List<BreakageVO> getAll() {
        return breakageMapper.getAll();
    }

    @Override
    public int add(Breakage breakage) {
        return breakageMapper.add(breakage);
    }

    @Override
    public int delete(Integer id) {
        return breakageMapper.delete(id);
    }

    @Override
    public int update(Breakage breakage) {
        return breakageMapper.update(breakage);
    }

    @Override
    public List<BreakageSituationVO> getBreakageSituation(String start, String end) {
        return breakageMapper.getBreakageSituation(start, end);
    }

}
